package com.li.day.day17;

//恶汉模式
public class EiHan {
    private EiHan() {}
    private static EiHan inter= new EiHan();
    public static EiHan getInstance() {
        return inter;
    }
}
class inin{
    public static void main(String[] args) {
        EiHan instance = EiHan.getInstance();
        EiHan instance2 = EiHan.getInstance();
        System.out.println(instance2==instance);
    }
}
